<template>
	<view class="container">
		<view class="myorder_list">
			<view class="myorder_ct">
				<view class="myorder_tfl">{{row.shopname}}</view>
			</view>
			<view class="myorder_ct border0">
				<view class="pro_dl">
					<view class="pro_dt">
						<image :src="row.image" mode="aspectFill"></image>
					</view>
					<view class="pro_dd">
						<view class="pro_title">{{row.name}}</view>
						<view class="pro_lable">{{row.catename}}</view>
						<view class="pro_bottom">
							<view class="pro_price">￥{{row.price}}</view>
							<view class="pro_num">x{{row.num}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="content pad30 fldl">
			<view class="fl">商品总价：</view>
			<view class="fr">￥{{row.zongjia}}</view>
		</view>
		<view class="content pad30 fldl">
			<view class="fl">优惠券：</view>
			<view class="fr">-￥{{row.coupon}}</view>
		</view>
		<view class="fktxt">实付款：<text>￥{{row.total}}</text></view>
		<view class="content bordt20 ddinfocont">
			<view class="ctitlebox">
				<view class="ctitle">订单信息</view>
			</view>
			<view class="ddinfo">
				<view>订单编号：{{row.orderid}}</view>
				<view>下单时间：{{row.time}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import API from "@/common/api.js";
	export default {
		data() {
			return {
				row: []
			}
		},
		onLoad(options) {
			var $this = this
			API.post("order/orderdetail", {
				orderid: options.orderid
			}).then((res) => {
				if (res.code == 1) {
					$this.row = res.data
				}
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.myorder_list {
		overflow: hidden;
		background: #fff;
		margin: 20rpx 0 0;
		box-sizing: border-box;
	}

	.myorder_ct {
		padding: 30rpx;
		width: 100%;
		overflow: hidden;
		box-sizing: border-box;
	}

	.myorder_ct {
		border-bottom: 2rpx #eee solid;
	}

	.myorder_ct.border0 {
		border-bottom-width: 0;
	}

	.myorder_tfl {
		color: #666;
		float: left;
		font-size: 32rpx;
		font-weight: bold;
	}

	.pro_dl {
		width: 100%;
		overflow: hidden;
		margin-bottom: 30rpx;
	}

	.pro_dl:last-child {
		margin-bottom: 0;
	}

	.pro_dt {
		width: 180rpx;
		height: 180rpx;
		border-radius: 10rpx;
		overflow: hidden;
		display: flex;
		justify-content: center;
		align-items: Center;
		float: left;
	}

	.pro_dt image {
		width: 100%;
		height: 100%;
		border-radius: 10rpx;
	}

	.pro_dd {
		padding-left: 210rpx;
	}

	.pro_title {
		line-height: 44rpx;
		font-size: 30rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.pro_lable {
		color: #999;
		margin-top: 10rpx;
	}

	.pro_bottom {
		margin-top: 50rpx;
	}

	.pro_price {
		float: left;
		font-size: 30rpx;
	}

	.pro_num {
		float: right;
		color: #999;
	}

	.fldl {
		line-height: 80rpx;
		font-size: 30rpx;
	}

	.fktxt {
		padding: 40rpx 30rpx 40rpx;
		overflow: hidden;
		box-sizing: border-box;
		text-align: right;
		font-size: 32rpx;
	}

	.fktxt text {
		color: $color; font-size: 36rpx; font-weight: bold;
	}

	.ddinfocont {
		padding: 40rpx 30rpx;
	}

	.ddinfo {
		margin-top: 30rpx;
		line-height:70rpx;
		font-size: 28rpx;
	}
	
</style>